package com.wqd.article.feign;

import com.wqd.apis.article.IArticleClient;
import com.wqd.article.service.IApArticleService;
import com.wqd.model.article.dtos.ArticleDto;
import com.wqd.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class ArticleClient implements IArticleClient {

    @Autowired
    private IApArticleService apArticleService;

    @Override
    @PostMapping("/api/v1/article/save")
    public ResponseResult saveArticle(@RequestBody ArticleDto dto) {
        return apArticleService.save(dto);
    }

}